﻿using System;
using System.ComponentModel;
using System.Xml.Serialization;
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
using DevExpress.Xpo.Helpers;
using DevExpress.Data.Filtering;
using DevExpress.ExpressApp;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
namespace Top.Module.Domain
{
    [DefaultClassOptions]
    [Persistent("TopTaohuaItem")]
    public class TopTaohuaItem : BaseObject
    {
        //begin
        public TopTaohuaItem()
        {}
        public TopTaohuaItem(Session session) : base(session)
        {}
        public override void AfterConstruction(){base.AfterConstruction();}

        private decimal _Price;
        public decimal Price
        {
            get
            {
                return _Price;
            }
            set
            {
                SetPropertyValue("Price", ref _Price, value);
            }
        }
        private long _Favorite;
        public long Favorite
        {
            get
            {
                return _Favorite;
            }
            set
            {
                SetPropertyValue("Favorite", ref _Favorite, value);
            }
        }
        private string _Author;
        public string Author
        {
            get
            {
                return _Author;
            }
            set
            {
                SetPropertyValue("Author", ref _Author, value);
            }
        }
        private string _PublishDate;
        public string PublishDate
        {
            get
            {
                return _PublishDate;
            }
            set
            {
                SetPropertyValue("PublishDate", ref _PublishDate, value);
            }
        }
        private string _Publisher;
        public string Publisher
        {
            get
            {
                return _Publisher;
            }
            set
            {
                SetPropertyValue("Publisher", ref _Publisher, value);
            }
        }
        private string _ItemId;
        public string ItemId
        {
            get
            {
                return _ItemId;
            }
            set
            {
                SetPropertyValue("ItemId", ref _ItemId, value);
            }
        }
        private string _FileType;
        public string FileType
        {
            get
            {
                return _FileType;
            }
            set
            {
                SetPropertyValue("FileType", ref _FileType, value);
            }
        }
        private string _Size;
        public string Size
        {
            get
            {
                return _Size;
            }
            set
            {
                SetPropertyValue("Size", ref _Size, value);
            }
        }
        private string _Description;
        [Size(SizeAttribute.Unlimited)]
        public string Description
        {
            get
            {
                return _Description;
            }
            set
            {
                SetPropertyValue("Description", ref _Description, value);
            }
        }
        private string _RootCateId;
        public string RootCateId
        {
            get
            {
                return _RootCateId;
            }
            set
            {
                SetPropertyValue("RootCateId", ref _RootCateId, value);
            }
        }
        private string _RootCateName;
        public string RootCateName
        {
            get
            {
                return _RootCateName;
            }
            set
            {
                SetPropertyValue("RootCateName", ref _RootCateName, value);
            }
        }
        private string _LeafCateId;
        public string LeafCateId
        {
            get
            {
                return _LeafCateId;
            }
            set
            {
                SetPropertyValue("LeafCateId", ref _LeafCateId, value);
            }
        }
        private string _LeafCateName;
        public string LeafCateName
        {
            get
            {
                return _LeafCateName;
            }
            set
            {
                SetPropertyValue("LeafCateName", ref _LeafCateName, value);
            }
        }
        private string _StatusName;
        public string StatusName
        {
            get
            {
                return _StatusName;
            }
            set
            {
                SetPropertyValue("StatusName", ref _StatusName, value);
            }
        }
        private string _PicUrl;
        public string PicUrl
        {
            get
            {
                return _PicUrl;
            }
            set
            {
                SetPropertyValue("PicUrl", ref _PicUrl, value);
            }
        }
        [Association("TopTaohuaItemTaohuaItemPvPairs", typeof(TopTaohuaItemPVPair)), Aggregated]
        public XPCollection<TopTaohuaItemPVPair> TaohuaItemPvPairs
        {
            get
            {
                return GetCollection<TopTaohuaItemPVPair>("TaohuaItemPvPairs");
            }
        }
        private string _Title;
        public string Title
        {
            get
            {
                return _Title;
            }
            set
            {
                SetPropertyValue("Title", ref _Title, value);
            }
        }
        //end
    }
}
